from flask import Flask
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from apps.models.user import *
from apps.models.search_record import *
from apps.models.device import *
from apps.models.fault_record import *

from apps import create_app
from exts import db

app = create_app()
manager = Manager(app=app)

migrate = Migrate(app=app, db=db)
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()
